package packing;
public class KinID
{
	final static int PROVIDED_TO_STUDENT = 1;
	final static int SOURCE_FILE = 2;
	final static int CLASS_FILE = 4;
	final static int INSTRUCTION = 8;
	final static int SCORE_CRITERIA = 16;
	final static int IO = 32;
	//final static int INPUT = 32;
	//final static int OUTPUT = 64;
	
	public static boolean instr(int kin)
	{
		return ((kin & PROVIDED_TO_STUDENT) > 0) && ((kin & INSTRUCTION) > 0);
	}

	//change this to provided_input(int kin){} and provided_output(int kin){}
	public static boolean provided_io(int kin)
	{
		return ((kin & PROVIDED_TO_STUDENT) > 0) && ((kin & IO) > 0);
	}

	//change this to test_input(int kin){} and test_output(int kin){}
	public static boolean test_io(int kin)
	{
		return ((kin & IO) > 0) && (kin & PROVIDED_TO_STUDENT) == 0;
	}

	public static boolean criteria(int kin)
	{
		return (kin & SCORE_CRITERIA) > 0;
	}

	public static boolean source_file(int kin)
	{
		return ((kin & PROVIDED_TO_STUDENT) > 0) && ((kin & SOURCE_FILE) > 0);
	}

	public static boolean class_file(int kin)
	{
		return ((kin & PROVIDED_TO_STUDENT) > 0) && ((kin & CLASS_FILE) > 0);
	}

	public static boolean provided(int kin)
	{
		return ((kin & PROVIDED_TO_STUDENT) > 0) && !instr(kin);
	}

	public static boolean solution(int kin)
	{
		return (kin & (CLASS_FILE | SOURCE_FILE)) > 0 || test_io(kin);
	}

}
